<?php
/**
 * Created by PhpStorm.
 * Author: sitenv@aliyun.com
 * CreateTime: 2021/07/11 16:02
 * Blog：www.myblogs.xyz
 */

namespace app\common\service;


class AdminService
{
    public static function cacheInfo($admin_id)
    {
        if (!cache('adminData')){
            $admin_model = new \app\common\model\Admin();
            $admin_fields = 'admin_id,account,nickname,role_id,password,level,admin_pid,area_ids,create_time';
            $adminData = $admin_model->getFind($admin_id, $admin_fields);
            cache('adminData', json_encode($adminData));
        }
        return json_decode(cache('adminData'), true);
    }
}